<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script>
		var arr=[0,1,2,3,4,5,6];
		function change(arr,index1,index2){
			var temp=arr[index1];
			arr[index1]=arr[index2];
			arr[index2]=temp;
			console.log(arr);
		}
		change(arr,2,4);
	</script>
</head>
<body>
	
</body>
</html>